<%@page import="models.UserModel"%>
<%@page import="java.util.TreeMap"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String returnUrl = (String) request.getAttribute("returnUrl");
	TreeMap check = (TreeMap) request.getAttribute("check");
	UserModel user = (UserModel) request.getAttribute("user");
%>

<jsp:include page="/layouts/header.jsp">
	<jsp:param name="language" value="1" />
</jsp:include>
<div id="content_inner">
	<div id="productDetailInfo" class="clearafter">
		<div class="left">
			<div class="mustLogin">
				<h1>Đăng nhập</h1>
				<div class="loginPopup">
					<form method="post" action="">
					<%
						if(returnUrl!=null&&returnUrl.length()>0){
							%>
							<input type="hidden" name="returnUrl" value="<%=returnUrl%>"/>
							<%
						}
					%>
						<div>
							<label class="<%=check.get("email") != null ? "error" : ""%>"> 
								Email: <input type="text" name="email" value="<%=user.getUsername() %>" />
								<div class="triangleUp"></div>
								<div class="errorMessage">
									<% if (check.get("email") != null) { %>
										<%=check.get("email") %>
									<% } %>
								</div> 
							</label>
						</div>
						<div>
							<label class="<%=check.get("password") != null ? "error" : ""%>"> 
								Mật khẩu: <input type="password" name="password" value="<%=user.getPassword() %>" />
								<div class="triangleUp"></div>
								<div class="errorMessage">
									<% if (check.get("password") != null) { %>
										<%=check.get("password") %>
									<% } %>
								</div> 
							</label>
						</div>
						<div>
							<label> <input type="checkbox" /> Nhớ trạng thái đăng nhập </label>
						</div>
						<div class="clearafter">
							<button type="submit" class="left button blue">Đăng nhập</button>
							<div class="left forgotPassword">
							[
							<a href="#">Quên mật khẩu?</a>
							]
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
		<div class="right rightSideBar">
			<jsp:include page="/elements/right_menu.jsp" />
		</div>
	</div>
</div>

<jsp:include page="/layouts/footer.jsp">
	<jsp:param name="language" value="1" />
</jsp:include>